ErrorHandler 1.02
Copyright (c) 1998 SamSoft PTY LTD
All Rights Reserved.
=============================================================


Table of Contents

1. Distribution
2. System Requirements
3. Overview
4. Installation
5. Use
6. Example
7. Registration

=============================================================
1. Distribution

This is only an evaluation/shareware copy of ErrorHandler.
Use it and then obtain a registered copy, if you are satisfied
with the product. Please feel free to distribute the ZIP file
containing ErrorHandler.dll and this readme file.

=============================================================
2. System Requirements
Any Microsoft Windows operating system that supports 32 bit applications

=============================================================
3. Overview
ErrorHandler is an easy to use 32 bit COM component that
handles exceptions in Visual Basic applications
and if the application is running on Windows NT platform,
logs the error message or any other type of message( Warning, Success, Failure, Information etc.)
to NT's Event Log and register it under its application's name. It provides the following services:
a.    Displays meaningful error messages with the following information:
    i.    The module raising the error
    ii.    The subroutine raising the error
    iii.    The application raising the error and in case of an automation object, the name of the object.
    iv.    Error number
    v.    Error description
    vi.    Programmer’s comments.   
               
b.    Detects the platform on which the application is running, and if
       Windows NT, logs above information plus the UserID of the current user to
       the NT's event log.

c.    Logs any other type of event (Warning,Success, Failure, Information etc.) to NT's Event
    Log and register it under its own application's name.
=============================================================
4. Installation
1. Register ErrorHandler.dll by using regsvr32.dll or any other utility
2. Open your VB project and select the menu item Project - References and check Samsoft Error Handler.

=============================================================
5. Use
Access to the services of the ErrorHandler is via a single method - Raise.

Syntax:
object.Raise SourceRoutine, ErrorType, errObj, SourceModule, Comments
The Raise method syntax has these parts:


Part        Description

object        Optional. An object of the type ErrorHandler.

SourceRoutine    String - the name of the current subroutine

ErrorType    Type of error (select from an Enum list)

ErrObj         An object of the type ErrObject (Just type in Err)

SourceModule    A visual basic object (Just type in App)

Comments     Optional. String - Programmer's comments

Remarks
You must supply Err and App as the third and fourth parameters respectively.

=============================================================
6. Example

This example displays a meaningful error message and logs useful
information concerning this message plus the UswerId of the current user
to windows Event log, if the application is running on Windows NT platform.
To run this example, put a CommandButton control on a form and name it
ErrorHandlerTest. Then paste the example into ErrorHandlerTest_Click,
run the project and click the CommandButton.

Private Sub ErrorHandlerTest_Click()
Dim objError As New ErrorHandler
    Dim testNo As Integer

    On Error GoTo RaiseError
    testNo = "g"
Exit Sub
RaiseError:
    objError.Raise " ErrorHandlerTest_Click()", _
    EVENTLOG_ERROR_TYPE, Err, App,"Have assigned a string value to an integer variable"
End Sub

This example simply Logs any other type of event (Error,Warning, or Success event)
to NT's Event    Log and register it under its own application's name.
To run this example, put a CommandButton control on a form and name it
ToEventLog. Then paste the example into ToEventLog_Click,
run the project and click the CommandButton.

Private Sub ToEventLog_Click()
Dim objError As New ErrorHandler
    Dim testNo As Integer

    On Error GoTo RaiseError
'the next line simply logs warning message to
'NT event log without raising error.

    objError.Raise " ErrorHandlerTest_Click()", _
    EVENTLOG_WARNING_TYPE, Err, App,"About to assign a string to an integer variable"

    testNo = "g"
Exit Sub
RaiseError:
    objError.Raise " ErrorHandlerTest_Click()", _
    EVENTLOG_ERROR_TYPE, Err, App,"Have assigned a string value to an integer variable"
End Sub


=============================================================
7. Registration
To register and download a registed copy of ErrorHandler

To register and have a registered copy of ErrorHandler Emailed to you Select:

Location 1:

Location2:

OR call

1 800 WWW2REG (1 800 999-2734) or (805) 288-1827


                                                                                                                    Talk To US